package org.cp.service.user.impl;

import org.cp.dao.user.IUserDAO;
import org.cp.service.user.IUserService;
import org.cp.vo.User;

public class UserService implements IUserService {
	private IUserDAO userDAO;

	public IUserDAO getUserDAO() {
		return userDAO;
	}

	public void setUserDAO(IUserDAO userDAO) {
		this.userDAO = userDAO;
	}

	public void changeUserInfo(User user) {
		userDAO.changeUserInfo(user);

	}

	public User login(String accounts, String passWord) {

		return userDAO.login(accounts, passWord);
	}

	public void logout() {
		// TODO Auto-generated method stub

	}

	public void register(User user) {
		userDAO.register(user);

	}
	public User searchUserByAccounts(String accounts){
		return userDAO.searchUserByAccounts(accounts);
	}

}
